# coding:utf-8
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
matplotlib.use('qt4agg')
# 指定默认字体
matplotlib.rcParams['font.sans-serif'] = ['SimHei']
matplotlib.rcParams['font.family'] = ['sans-serif']
# 解决负号'-'显示为方块的问题
matplotlib.rcParams['axes.unicode_minus'] = False

t = np.arange(0,5,0.2)
x1 = y1 = t
x2 = x1
y2 = t**2
x3 = x1
y3 = t**3
linelist = plt.plot(x1,y1,x2,y2,x3,y3)
plt.setp(linelist[0],color='r',marker='o',linestyle=':')
plt.setp(linelist[1],color='g',marker='s',linestyle='-')
plt.setp(linelist[2],color='blue',marker='^',linestyle='-.')
plt.show()
